<?php
require '../common.php';
//$id = $_GET["id"];
//echo($_SERVER['HTTP_REFERER']);
$str = $_SERVER['HTTP_REFERER'];
  $arr = explode("/",$str);
  $flag = $arr[count($arr)-1];
if($flag=="article.php"){
    $id = $_GET["id"];

   // echo $id;
  query("delete from article where id = '$id'");
   redirect("article.php","删除成功！");
}else if($flag=="tag.php"){
    $id = $_GET["id"];

   // echo $id;
 query("delete from tag where id = '$id'");
   redirect("tag.php","删除成功！");
}


?>